﻿Imports System.Data.OleDb
Module conmodule
    Public con As OleDbConnection
    Public Sub conopen()
        Try
            Dim str As String
            str = "Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "/ladger.accdb;"
            con = New OleDbConnection(str)
            con.Open()
        Catch ex As Exception
            MsgBox(ex.ToString)
        End Try
    End Sub
End Module
